using System.Collections.Generic;
using System;

namespace CloudApiServer
{
    /// <summary>
    /// 处方中心外层传入
    /// </summary>
    public class FsiRequestEpcHeader
    {
        public string appId { get; set; }
        public string version { get; set; }
        public string timestamp { get; set; }
        public string encType {  get; set; }
        public string encData { get; set; }
        public string signType { get; set;}
        public string signData { get; set;}
    }
    /// <summary>
    /// 处方中心  人工审核传入
    /// </summary>
    public class FsiRequestEpcAgentReqRxAuthRegInput
    {
        public string cardInfo { get; set; }
        public string fixmedinsCode { get; set; }
        public string psnName { get; set; }
        public string psnCertType { get; set; }
        public string certno { get; set; }
        public string agnterName { get; set; }
        public string agnterCertType { get; set; }
        public string agnterCertno { get; set; }
        public string regerName { get; set; }
        public string regerCertType { get; set; }
        public string regerCertno { get; set; }
        public string ipInfo { get; set; }
    }

    /// <summary>
    /// 处方中心 预授权传入
    /// </summary>
    public class FsiRequestEpcRxAuthQueryInput
    {
        /// <summary>
        /// 
        /// </summary>
        public string opter { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string certno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psnCertType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ecToken { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string regSn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string optinsNo { get; set; }
        /// <summary>
        /// 测试_顾伊朶
        /// </summary>
        public string psnName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ipInfo { get; set; }
        /// <summary>
        /// 白芷
        /// </summary>
        public string opterName { get; set; }
    }
    /// <summary>
    /// 处方中心 电子处方下载
    /// </summary>
    public class FsiRequestEpcRxInfoDldInput
    {
        /// <summary>
        /// 
        /// </summary>
        public string authRxno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string devInfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string epcToken { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ipInfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter { get; set; }
        /// <summary>
        /// 李时珍
        /// </summary>
        public string opterName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string optinsNo { get; set; }
    }

    /// <summary>
    /// 处方中心 定点医药机构药品库存价格同步
    /// </summary>
    public class FsiRequestEpcDrugListBatchSyncInput
    {
	    
	    public List<FsiRequestEpcDrugListBatchSyncInputList> fixMedinsDrugUpdateDTOList {get; set; }
	    
    }

    /// <summary>
    /// 处方中心 定点医药机构库存价格同步列表
    /// </summary>
    public class FsiRequestEpcDrugListBatchSyncInputList
    {
	    /// <summary>
	    /// 定点医药机构编码
	    /// </summary>
	    public string fixmedinsCode { get; set; }
	    /// <summary>
	    /// 定点医药机构目录编码 定点医药机构系统内部唯一的目录编码 （医保平台不存在该药品库存信息时，自动新增） 
	    /// </summary>
	    public string fixmedinsHilistId { get; set; }
	    /// <summary>
	    /// 医疗目录编码(医保药品编码) 
	    /// </summary>
	    public string medListCodg { get; set; }
	    /// <summary>
	    /// 状态编码  1：上架，0：下架
	    /// </summary>
	    public string stasCodg { get; set; }
	    /// <summary>
	    /// 状态名称
	    /// </summary>
	    public string stasName { get; set; }
	    /// <summary>
	    /// 销售价格
	    /// </summary>
	    public decimal selPric { get; set; }
	    /// <summary>
	    /// 库存
	    /// </summary>
	    public int inv { get; set; }
    }

    /// <summary>
    /// 处方中心 定点医药机构药品库存信息查询
    /// </summary>
    public class FsiRequestEpcDrugInfoListQueryInput
    {
	    /// <summary>
	    /// 定点医药机构编码
	    /// </summary>
	    public string fixmedinsCode { get; set; }
	    /// <summary>
	    /// 上次更新时间 
	    /// </summary>
	    public string lastUpdtTime { get; set; }
	    /// <summary>
	    /// 医疗目录编码(医保药品编码) 
	    /// </summary>
	    public string medListCodg { get; set; }
	    /// <summary>
	    /// 定点医药机构目录编码
	    /// </summary>
	    public string fixmedinsHilistId { get; set; }
	    /// <summary>
	    /// 页码
	    /// </summary>
	    public int  pageNum { get; set; }
	    /// <summary>
	    /// 分页size
	    /// </summary>
	    public int pageSize  { get; set; }

    }
    
    
	/// <summary>
    /// 处方中心整个报文输出
    /// </summary>
    public class FsiEpcHeader 
    {
        public int code { get; set; }
        public string appId { get; set; }
        public string timestamp { get; set; } 
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string signData { get; set; }
        public string encData { get; set; }
        public string message { get; set; }
        public string success { get; set; }
        public string type { get; set; }
    }
    /// <summary>
    /// 处方中心失败报文输出
    /// </summary>
    public class FsiEpcErrorHeader
    {
        public int code { get; set; }
        public string message { get; set; }
    }
    /// <summary>
    /// 处方中心 输出报文
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiEpcOutput<TResult>
    {
        public string appId { get; set; }
        public TResult data { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }

        public string version { get; set; } = "1.0.0";
        public string key { get; set; } = FsiEpcTokeninfo.appSecret;
    }
    /// <summary>
    /// 处方中心 签名dto输出参数
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiEpcDtoOutput<TResult>
    {
        public string appId { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }
        public TResult data { get; set; }
    }
    /// <summary>
    /// 处方中心 列表输出参数
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiEpcOutputList<TResult>
    {
        public string appId { get; set; }
        public List<TResult> data { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }
        public string version { get; set; }
        public string key { get; set; } = FsiEpcTokeninfo.appSecret;
    }
    /// <summary>
    /// 处方中心 人工审核
    /// </summary>
    public class FsiEpcAgentReqRxAuthRegOutputData
    {
        public string regSn { get; set; }
        public DateTime datetime { get; set; }
    }

    /// <summary>
    /// 处方中心 处方预核验
    /// </summary>
    public class FsiEpcRxAuthQueryOutputData
    {
        public string authRxno { get; set; }
        public string epcToken { get; set; }
        public string expiresIn { get; set; }
        public string fixmedinsCode { get; set; }
        public string fixmedinsName { get; set; }
        public string prscTime { get; set; }
        public string deptName { get; set; }
        public string diseCodg { get; set; }
        public string diseName { get; set; }
        public string valiEndTime { get; set; }
    }

    /// <summary>
    /// 处方中心 处方下载-主节点
    /// </summary>
    public class FsiEpcRxInfoDldOutputData
    {
        public string hiRxno { get; set; }
        public string rxTraceCode { get; set;}
        public string fixmedinsCode { get; set;}
        public string fixmedinsName { get;set; }
        public string prscTime { get; set;}
        public string prscDeptName { get; set;}
        public string valiEndTime { get;set; }
        public string rxTypeCode { get;set; }
        public string rxTypeName { get; set; } 
        public string longRxFlag { get; set;}
        public string rxFile { get; set;}
        public string fileSuffix { get; set; }
        public List<FsiEpcRxInfoDldOutputRxDetlList>  rxDetlList { get; set; }
        public FsiEpcRxInfoDldOutputRxOtpinfo rxOtpinfo { get;set; }
    }
    /// <summary>
    /// 处方中心 处方下载-药品明细
    /// </summary>
    public class FsiEpcRxInfoDldOutputRxDetlList
    {
        /// <summary>
        /// 
        /// </summary>
        public string medListCodg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsHilistId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hospPrepFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rxItemTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rxItemTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrugTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrugTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmherbFoote { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mednTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mednTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mainMedcFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string urgtFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string basMednFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string impDrugFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugProdname { get; set; }
        /// <summary>
        /// 阿莫西林片
        /// </summary>
        public string drugGenname { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugDosform { get; set; }
        /// <summary>
        /// 按C16H19N3O5S计0.25g*24片/盒
        /// </summary>
        public string drugSpec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prdrName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal drugCnt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcWayCodg { get; set; }
        /// <summary>
        /// 口服
        /// </summary>
        public string medcWayDscr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcEndtime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcBegntime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal medcDays { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string drugDosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal sinDoscnt { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string sinDosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string usedFrquCodg { get; set; }
        /// <summary>
        /// 每天一次
        /// </summary>
        public string usedFrquName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugTotlcnt { get; set; }
        /// <summary>
        /// 盒
        /// </summary>
        public string drugTotlcntEmp { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hospApprFlag { get; set; }
    }
    /// <summary>
    /// 处方中心 处方下载-诊断明细
    /// </summary>
    public class FsiEpcRxInfoDldOutputRxOtpinfo
    {
        public string medType { get; set; }
        public string otpIptFlag { get; set;}
        public string patnName { get; set; }
        public  decimal patnAge { get;set; }
        public string patnHgt { get; set;}
        public decimal patnWt { get; set;} 
        public string  gend { get; set;}
        public decimal gesoVal { get; set;}
        public string nwbFlag { get; set; }
        public string nwbAge { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string suckPrdFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string algsHis { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseCodg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string maindiagCode { get; set; }
        /// <summary>
        /// 麻风
        /// </summary>
        public string maindiagName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseCondDscr { get; set; }
    }

    /// <summary>
    /// 处方中心 处方核验
    /// </summary>
    public class FsiEpcRxInfoVerifyOutputData
    {
        public bool flag { get; set; }
        public string rxSignVerifySn { get; set; }
        public string signCertSn { get; set; }
        public string signCertDn { get; set; }
    }

    /// <summary>
    /// 处方中心 审核信息上传
    /// </summary>
    public class FsiEpcRxChkUpldOutputData
    {
        public bool flag { get; set; }
        public string rxChkBizSn { get; set; }
    }
    /// <summary>
    /// 处方中心 定点医药机构销售出库上传
    /// </summary>
    public class FsiEpcRxSelDrugUpldOutputData
    {
        /// <summary>
        /// 通知成功标志位 
        /// </summary>
        public bool flag { get; set; }
    }
    /// <summary>
    /// 处方中心 定点医药机构库存信息上传
    /// </summary>
    public class FsiEpcDrugListBatchSyncOutputData
    {
        /// <summary>
        /// 通知成功标志位 
        /// </summary>
        public bool flag { get; set; }
        /// <summary>
        /// 未匹配到的定点医药机构目录编码集合
        /// </summary>
        public List<string> disMatchFixListCodes { get; set; }
    }
    /// <summary>
    /// 处方中心 定点医药机构库存信息查询
    /// </summary>
    public class FsiEpcDrugInfoListQueryOutputData
    {
        /// <summary>
        /// 总笔数
        /// </summary>
        public int total { get; set; }
        /// <summary>
        /// 当前条数
        /// </summary>
        public int size { get; set; }
        /// <summary>
        /// 页数
        /// </summary>
        public int pages { get; set; }
        /// <summary>
        /// 库存信息列表
        /// </summary>
        public List<FsiEpcDrugInfoDrugInfoListQueryOutputList> list {get; set; }
    }
    /// <summary>
    /// 处方中心 定点医药机构库存信息查询 药品库存集合
    /// </summary>
    public class FsiEpcDrugInfoDrugInfoListQueryOutputList
    {
        /// <summary>
        /// 医疗目录编码
        /// </summary>
        public string medListCodg{get; set; }
        /// <summary>
        /// 定点医药机构目录编码
        /// </summary>
        public string fixmedinsHilistId { get; set; }
        /// <summary>
        /// 定点医药机构编码
        /// </summary>
        public string fixmedinsCode{get; set; }
        /// <summary>
        /// 通用名
        /// </summary>
        public string  genname { get; set; }
        /// <summary>
        /// 商品名
        /// </summary>
        public string  prodname {get; set; }
        /// <summary>
        /// 药品名称
        /// </summary>
        public string  drugName { get; set; }
        /// <summary>
        /// 药品规格
        /// </summary>
        public string spec { get; set; }
        /// <summary>
        /// 生产厂家
        /// </summary>
        public string prdr { get; set; }
        /// <summary>
        /// 剂型
        /// </summary>
        public string dosform { get; set; }
        /// <summary>
        /// 批准文号 注册证号
        /// </summary>
        public string aprvno { get; set; }
        /// <summary>
        /// 药品条码
        /// </summary>
        public string barCode{ get; set; }
        /// <summary>
        /// 状态编码
        /// </summary>
        public string stasCode { get; set; }
        /// <summary>
        /// 状态名称
        /// </summary>
        public string stasName  { get; set; }
        /// <summary>
        /// 销售价格
        /// </summary>
        public decimal selPric { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        public int inv { get; set; }
        /// <summary>
        /// 药品分类名称
        /// </summary>
        public string drugClssName { get; set; }
        /// <summary>
        /// 药品属性编码
        /// </summary>
        public string drugAttrCodg  { get; set; }
        /// <summary>
        /// 药品属性名称
        /// </summary>
        public string drugAttrName { get; set; }
        /// <summary>
        /// 药品类别编码 
        /// </summary>
        public string drugTypeCodg { get; set; }
        /// <summary>
        /// 药品类别名称
        /// </summary>
        public string drugTypeName { get; set; }
        /// <summary>
        /// 包装单位 
        /// </summary>
        public string pacunt  { get; set; }
        /// <summary>
        /// 拆零单位 
        /// </summary>
        public string trdnUnt { get; set; }
        /// <summary>
        /// 是否处方
        /// </summary>
        public int rxFlag { get; set; }
        /// <summary>
        /// 是否中药饮片 
        /// </summary>
        public int tmdpFlag { get; set; }
        /// <summary>
        /// 是否含麻药品
        /// </summary>
        public int anstFlag { get; set; }
        /// <summary>
        /// 药品本位码
        /// </summary>
        public string drugstdcode { get; set; }
        /// <summary>
        /// 同步更新时间 
        /// </summary>
        public string updtTime { get; set; }

    
    }
}

